home *** CD-ROM | disk | FTP | other *** search
- Path: news.itd.umich.edu!clahey
- From: clahey@rep00703.reshall.umich.edu (Chris Lahey)
- Newsgroups: comp.lang.c
- Subject: Re: Clearing the keyboard buffer in ANSI C
- Date: 29 Jan 1996 07:32:11 GMT
- Organization: University of Michigan
- Message-ID: <CLAHEY.96Jan29073211@rep00703.reshall.umich.edu>
- References: <tfiedler-2801961347210001@205.217.163.224>
- NNTP-Posting-Host: rep00703.reshall.umich.edu
- In-reply-to: tfiedler@muscanet.com's message of 28 Jan 1996 19:39:50 GMT
-
- In article <tfiedler-2801961347210001@205.217.163.224> tfiedler@muscanet.com (Todd A. Fiedler) writes:
-
- I am a newbie to C and I can't figure out how to clear the keyboard buffer.
-
- I use
-
- while (getchar() != '\n');
-
- If that's not what you want you should check out getchar() anyway.
- Good Luck with it.
- Chris
-